<script type="text/javascript">
var successFun=function(res){
if(res.code==200){
	alert('更新成功！如果修改了模板，请到工具-》清除模板缓存中清空模板缓存！');
}
}
$(document).ready(function() { 
	var updateOptions	= {dataType:'json',error:doError,success:doSuccess}
    $('#form').ajaxForm(updateOptions); 
}); 
</script>
<div id="content" class="sitesetting">
<form id="form" action="{url('Site','SaveSite')}" method="post">
<h3 class="title">网站设置</h3>
<table class="admin-table">
	<tr>
	<td>模板选择</td>
	<td>
	<select name="template">
	<!--{loop $this->data['templates'] $item}-->
	<option value="{$item}" {if $this->data['site']['template']==$item}selected{/if}>{$item}</option>
	<!--{/loop}-->
	</select>
	<span etype='error_info' class="error_info" id="template_info"></span>
	</td>
	</tr>
	<tr>
	<td>网站名称</td>
	<td>
	<input name="site_name" id="site_name" type="text" value="{$this->data['site']['site_name']}" /><span etype='error_info' class="error_info"id="site_name_info"></span>
	</td>
	</tr>
	<tr>
	<td>备案信息</td>
	<td>
	<input name="beian" id="beian" type="text" value="{$this->data['site']['beian']}" /><span etype='error_info' class="error_info"id="beian_info"></span>
	</td>
	</tr>
	<tr>
	<td>站长E-mail</td>
	<td>
	<input name="email" id="email" type="text" value="{$this->data['site']['email']}" /><span etype='error_info' class="error_info"id="email_info"></span>
	</td>
	</tr>
	<tr>
	<td>站长QQ</td>
	<td>
	<input name="qq" id="qq" type="text" value="{$this->data['site']['qq']}" /><span etype='error_info' class="error_info"id="qq_info"></span>
	</td>
	</tr>
	<tr>
	<td>站长旺旺</td>
	<td>
	<input name="wangwang" id="wangwang" type="text" value="{$this->data['site']['wangwang']}" /><span etype='error_info' class="error_info"id="wangwang_info"></span>
	</td>
	</tr>
	<tr>
	<td>统计代码</td>
	<td>
	<textarea name="tongji" id="tongji" cols="50" rows="5">{$this->data['site']['tongji']}</textarea><span etype='error_info' class="error_info"id="tongji_info"></span>
	</td>
	</tr>
	<tr><td colspan="2"><input id="btnSave" type="submit" value="保存" /></td></tr>
</table>
</form>
</div>